-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix alignment errors in hashtable fuzzer #24276
Conversation
I think a better fix would be to load the values via
|
we extract several values (uint16_t and uint64_t from the fuzzer buff passed in, but they weren't aligned on 2 and 8 byte boundaries. Adjust the fuzzer to memcpy data to the target variables to avoid unalignment issues Fixes openssl#24272
updated to use memcpy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; memcpy()
is also understood by clang
and gcc
as an idiom to load potentially unaligned data, and will be optimised to a single load instruction on platforms where this is possible
@tom-cosgrove-arm @paulidale Do you agree with urgent? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. change fixes all those places in hastable.c
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
@t8m Apologies, I've been AFK, but yes, agree with urgent (although a bit late now!) |
Merged to the master branch. Thank you. |
we extract several values (uint16_t and uint64_t from the fuzzer buff passed in, but they weren't aligned on 2 and 8 byte boundaries. Adjust the fuzzer to memcpy data to the target variables to avoid unalignment issues Fixes #24272 Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from #24276)
we extract several values (uint16_t and uint64_t from the fuzzer buff passed in, but they weren't aligned on 2 and 8 byte boundaries. Adjust the fuzzer to memcpy data to the target variables to avoid unalignment issues Fixes openssl#24272 Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from openssl#24276)
we extract several values (uint16_t and uint64_t from the fuzzer buff passed in, but they weren't aligned on 2 and 8 byte boundaries. Adjust the fuzzer to use the proper offsets
Fixes #24272